import HttpService from "@/api";

/**
 * @description 获取岗位列表
 * @param params
 * @returns
 */
export const getPostListApi = (params: any) => HttpService.get<any>(`/system/post/list`, { params });

/**
 * @description 新增岗位
 * @param data
 * @returns
 */
export const addPostApi = (data: any) => HttpService.post<any>(`/system/post`, data);

/**
 * @description 更新岗位
 * @param data
 * @returns
 */
export const updatePostApi = (data: any) => HttpService.put<any>(`/system/post`, data);

/**
 * @description 删除岗位
 * @param id
 * @returns
 */
export const delPostApi = (id: number) => HttpService.delete<any>(`/system/post/${id}`);

/**
 * @description 根据岗位id获取岗位信息
 * @param postId
 * @returns
 */
export const getPostInfoApi = (postId: number) => HttpService.get<any>(`/system/post/${postId}`);

/**
 * @description 岗位选择列表框
 * @param
 * @returns
 */
export const getPostOptionSelect = () => HttpService.get<any>(`/system/post/optionSelect`);
